#include <iostream>
#include <cstring>
#include <fstream>
using std::cout;
using std::endl;
using std::ofstream;
using std::string;

void test(){

    ofstream ofs("1.txt");
    string line("hello\n");
    ofs << line;
    ofs.close();
}

void test2(){
    
    ofstream ofs2("1.txt");
    char buf[100] = "hello,xww";
    ofs2.write(buf,strlen(buf));
}


int main()
{
    test2();
    return 0;
}

